/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package game1;

import java.awt.Color;
import java.awt.geom.Ellipse2D;
import java.awt.geom.Line2D;
import java.awt.geom.Rectangle2D;

/**
 *
 * @author Юра
 */
public class Minigun extends Friends {

    public Minigun() {
        super();
        setAnotherPropertis();
    }

    public Minigun(int x, int y) {
        super(x,y);
        setAnotherPropertis();
    }

    public Minigun(int x, int y, Color color) {
        super(x,  y, color);
        setAnotherPropertis();

    }

    public void setAnotherPropertis(){
        rotate_speed = 0.1;
        distance = 100;
        reload_time=15;
        bullet_speed = 10;
    }

    @Override
    public void uniqDraw() {
        img.add(new Rectangle2D.Double(this.place.getX(),this.place.getY()-3,this.r+8,6)); // stvol
        img.add(new Rectangle2D.Double(this.place.getX()-10,this.place.getY()-3,this.r+4,6)); //hijniy kvadrat
        img.add(new Line2D.Double(this.place.getX()+11,this.place.getY()-3,this.place.getX()+11,this.place.getY()+3)); //poperechnaya liniya
        img.add(new Line2D.Double(this.place.getX()+10,this.place.getY()-3,this.place.getX()+10,this.place.getY()+3)); //poperechnaya liniya 2
        img.add(new Line2D.Double(this.place.getX(),this.place.getY()+1,this.place.getX()+14,this.place.getY()+1)); //pravaya lapa
        img.add(new Line2D.Double(this.place.getX(),this.place.getY()-1,this.place.getX()+14,this.place.getY()-1)); //levaya lapa
        img.add(new Ellipse2D.Double(this.place.getX()-r, this.place.getY()-r, this.r*2, this.r*2));
    }

    @Override
    protected void shot() {
        new AePlayWave("c:/Documents and Settings/Юра/Мои документы/NetBeansProjects/Game1/src/game1/minigun_firing.wav").start();
        boollets.add(new Dots(place));
        load++;
    }
}
